package com.moko.view;

import com.moko.R;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.MotionEvent;
import android.widget.ImageView;

public class ImageDialog extends Dialog {

	private Bitmap bm;
	private ImageView imageView;

	public ImageDialog(Context context, Bitmap bm) {
		super(context, R.style.imageDialog);
		this.bm = bm;
	}

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.image_dialog);
		imageView = (ImageView) findViewById(R.id.image_dialog);
		imageView.setImageBitmap(bm);
	}

	@Override
    public boolean onTouchEvent(MotionEvent event) {
		this.dismiss();
	    return super.onTouchEvent(event);
    }

}